package com.ruoyi.teaching.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teaching.mapper.ClassesMapper;
import com.ruoyi.teaching.domain.Classes;
import com.ruoyi.teaching.service.IClassesService;

/**
 * 课程Service业务层处理
 *
 * @author sunshine
 * @date 2024-01-20
 */
@Service
public class ClassesServiceImpl implements IClassesService
{
    @Autowired
    private ClassesMapper classesMapper;

    /**
     * 查询课程
     *
     * @param id 课程主键
     * @return 课程
     */
    @Override
    public Classes selectClassesById(Long id)
    {
        return classesMapper.selectClassesById(id);
    }

    /**
     * 查询课程列表
     *
     * @param classes 课程
     * @return 课程
     */
    @Override
    public List<Classes> selectClassesList(Classes classes)
    {
        return classesMapper.selectClassesList(classes);
    }

    /**
     * 新增课程
     *
     * @param classes 课程
     * @return 结果
     */
    @Override
    public int insertClasses(Classes classes)
    {
        return classesMapper.insertClasses(classes);
    }

    /**
     * 修改课程
     *
     * @param classes 课程
     * @return 结果
     */
    @Override
    public int updateClasses(Classes classes)
    {
        return classesMapper.updateClasses(classes);
    }

    /**
     * 批量删除课程
     *
     * @param ids 需要删除的课程主键
     * @return 结果
     */
    @Override
    public int deleteClassesByIds(Long[] ids)
    {
        return classesMapper.deleteClassesByIds(ids);
    }

    /**
     * 删除课程信息
     *
     * @param id 课程主键
     * @return 结果
     */
    @Override
    public int deleteClassesById(Long id)
    {
        return classesMapper.deleteClassesById(id);
    }


}
